package com.tmpt.dto;

import com.inspiresoftware.lib.dto.geda.annotations.Dto;
import com.inspiresoftware.lib.dto.geda.annotations.DtoCollection;
import com.inspiresoftware.lib.dto.geda.annotations.DtoField;
import com.tmpt.beans.*;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;


@Dto("com.tmpt.beans.A1TemplateTable")
public class A1TemplateTableDto  implements Serializable{
	private static final long serialVersionUID = 1L;
	
	@DtoField
	private long id;
	@DtoField
	private String keyRandom;
	@DtoField
	private String tableName;
	@DtoField
	private String tableNameShow;
	@DtoField
	private String primaryKey;
	@DtoField
	private String foreignKey;
	@DtoField
	private int mode;
	@DtoField
	private String tableAliasName;

	@DtoField
	private int hasAddBtn;
	@DtoField
	private int hasDownloadReportBtn;
	@DtoField
	private int hasEditBtn;
	@DtoField
	private int hasHistoryBtn;

	@DtoField
	private String beanObject;
	@DtoField
	private String beanMethod;
	@DtoField
	private String beanHistoryMethod;

	//拦截器对象和方法，添加、修改时，先执行这个
	@DtoField
	private String interceptObject;
	@DtoField
	private String interceptAddMethod;
	@DtoField
	private String interceptEditMethod;
	
	
	@DtoField
	private String tableNameSql;
	@DtoField
	private String tableNameHistorySql;

	@DtoField
	private String sqlPage;
	@DtoField
	private String sqlCount;
	@DtoField
	private String sqlSum;
	@DtoField
	private String sqlReport;
	@DtoField
	private String sqlPageHistory;
	@DtoField
	private String sqlCountHistory;

	@DtoField
	private int width4AddDialog ;
	@DtoField
	private int height4AddDialog ;
	@DtoField
	private String style4AddDialog ;
	@DtoField
	private int isdialog4AddDialog ;

	@DtoField
	private int hasCheckbox ;
	
	@DtoField
	private int deleteFlag ;//default0,1已删除
	@DtoField(readOnly=true)
	private Timestamp createDate ;
	@DtoField
	private Timestamp modifyDate ;
	@DtoField
	private String createMan ;
	@DtoField
	private String modifyMan ;

	//{"caption": "Website Visitors","subCaption": "Last week Vs This week", "xAxisName": "Day",
    //"yAxisName": "No. of Visitors","theme": "fint","showValues": "0","adjustDiv": "0","yAxisMaxvalue": "35000",
    //"yAxisMinValue": "5000","numDivLines": "9"}
	@DtoField
	private String chartJson;
	@DtoField
	private int chartWidth;
	@DtoField
	private int chartHeight;
	@DtoField
	private String dataSource;

	@DtoCollection(
			value="a1TemplateColumnList",
			dtoToEntityMatcher=A1TemplateTable_ColumnMatcher.class,
			entityGenericType=A1TemplateColumn.class,
			dtoBeanKey="a1TemplateColumnDto",
			entityBeanKeys="a1TemplateColumn",
			readOnly=true
	)
	private List<A1TemplateColumnDto> a1TemplateColumnDtoList = new ArrayList<A1TemplateColumnDto>();
	
	@DtoCollection(
			value="a1TemplateConditionList",
			dtoToEntityMatcher=A1TemplateTable_ConditionMatcher.class,
			entityGenericType=A1TemplateCondition.class,
			dtoBeanKey="a1TemplateConditionDto",
			entityBeanKeys="a1TemplateCondition",
			readOnly=true
	)
	private List<A1TemplateConditionDto> a1TemplateConditionDtoList = new ArrayList<A1TemplateConditionDto>();

	@DtoCollection(
			value="a1TemplateRightMenuList",
			dtoToEntityMatcher=A1TemplateTable_RightMenuMatcher.class,
			entityGenericType=A1TemplateRightMenu.class,
			dtoBeanKey="a1TemplateRightMenuDto",
			entityBeanKeys="a1TemplateRightMenu",
			readOnly=true
	)
	private List<A1TemplateRightMenuDto> a1TemplateRightMenuDtoList = new ArrayList<A1TemplateRightMenuDto>();


	@DtoCollection(
			value="a1TemplateToolbarBtnList",
			dtoToEntityMatcher=A1TemplateTable_ToolbarBtnMatcher.class,
			entityGenericType=A1TemplateToolbarBtn.class,
			dtoBeanKey="a1TemplateToolbarBtnDto",
			entityBeanKeys="a1TemplateToolbarBtn",
			readOnly=true
	)
	private List<A1TemplateToolbarBtnDto> a1TemplateToolbarBtnDtoList = new ArrayList<A1TemplateToolbarBtnDto>();

	@DtoCollection(
			value="a1TemplateLineTailMenuList",
			dtoToEntityMatcher=A1TemplateTable_LineTailMenuMatcher.class,
			entityGenericType=A1TemplateLineTailMenu.class,
			dtoBeanKey="a1TemplateLineTailMenuDto",
			entityBeanKeys="a1TemplateLineTailMenu",
			readOnly=true
	)
	private List<A1TemplateLineTailMenuDto> a1TemplateLineTailMenuDtoList = new ArrayList<A1TemplateLineTailMenuDto>();

	
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getKeyRandom() {
		return keyRandom;
	}

	public void setKeyRandom(String keyRandom) {
		this.keyRandom = keyRandom;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getTableNameShow() {
		return tableNameShow;
	}

	public void setTableNameShow(String tableNameShow) {
		this.tableNameShow = tableNameShow;
	}

	public String getPrimaryKey() {
		return primaryKey;
	}

	public void setPrimaryKey(String primaryKey) {
		this.primaryKey = primaryKey;
	}

	public int getMode() {
		return mode;
	}

	public void setMode(int mode) {
		this.mode = mode;
	}

	public List<A1TemplateColumnDto> getA1TemplateColumnDtoList() {
		return a1TemplateColumnDtoList;
	}

	public void setA1TemplateColumnDtoList(
			List<A1TemplateColumnDto> a1TemplateColumnDtoList) {
		this.a1TemplateColumnDtoList = a1TemplateColumnDtoList;
	}

	public List<A1TemplateConditionDto> getA1TemplateConditionDtoList() {
		return a1TemplateConditionDtoList;
	}

	public void setA1TemplateConditionDtoList(
			List<A1TemplateConditionDto> a1TemplateConditionDtoList) {
		this.a1TemplateConditionDtoList = a1TemplateConditionDtoList;
	}

	public List<A1TemplateRightMenuDto> getA1TemplateRightMenuDtoList() {
		return a1TemplateRightMenuDtoList;
	}

	public void setA1TemplateRightMenuDtoList(
			List<A1TemplateRightMenuDto> a1TemplateRightMenuDtoList) {
		this.a1TemplateRightMenuDtoList = a1TemplateRightMenuDtoList;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public List<A1TemplateToolbarBtnDto> getA1TemplateToolbarBtnDtoList() {
		return a1TemplateToolbarBtnDtoList;
	}

	public void setA1TemplateToolbarBtnDtoList(
			List<A1TemplateToolbarBtnDto> a1TemplateToolbarBtnDtoList) {
		this.a1TemplateToolbarBtnDtoList = a1TemplateToolbarBtnDtoList;
	}

	public int getHasAddBtn() {
		return hasAddBtn;
	}

	public void setHasAddBtn(int hasAddBtn) {
		this.hasAddBtn = hasAddBtn;
	}

	public int getHasDownloadReportBtn() {
		return hasDownloadReportBtn;
	}

	public void setHasDownloadReportBtn(int hasDownloadReportBtn) {
		this.hasDownloadReportBtn = hasDownloadReportBtn;
	}

	public int getHasEditBtn() {
		return hasEditBtn;
	}

	public void setHasEditBtn(int hasEditBtn) {
		this.hasEditBtn = hasEditBtn;
	}

	public int getHasHistoryBtn() {
		return hasHistoryBtn;
	}

	public void setHasHistoryBtn(int hasHistoryBtn) {
		this.hasHistoryBtn = hasHistoryBtn;
	}

	public String getBeanObject() {
		return beanObject;
	}

	public void setBeanObject(String beanObject) {
		this.beanObject = beanObject;
	}

	public String getBeanMethod() {
		return beanMethod;
	}

	public void setBeanMethod(String beanMethod) {
		this.beanMethod = beanMethod;
	}

	public List<A1TemplateLineTailMenuDto> getA1TemplateLineTailMenuDtoList() {
		return a1TemplateLineTailMenuDtoList;
	}

	public void setA1TemplateLineTailMenuDtoList(
			List<A1TemplateLineTailMenuDto> a1TemplateLineTailMenuDtoList) {
		this.a1TemplateLineTailMenuDtoList = a1TemplateLineTailMenuDtoList;
	}

	public String getBeanHistoryMethod() {
		return beanHistoryMethod;
	}

	public void setBeanHistoryMethod(String beanHistoryMethod) {
		this.beanHistoryMethod = beanHistoryMethod;
	}

	public String getTableAliasName() {
		return tableAliasName;
	}

	public void setTableAliasName(String tableAliasName) {
		this.tableAliasName = tableAliasName;
	}

	public String getSqlCount() {
		return sqlCount;
	}

	public void setSqlCount(String sqlCount) {
		this.sqlCount = sqlCount;
	}

	public String getTableNameSql() {
		return tableNameSql;
	}

	public void setTableNameSql(String tableNameSql) {
		this.tableNameSql = tableNameSql;
	}

	public String getTableNameHistorySql() {
		return tableNameHistorySql;
	}

	public void setTableNameHistorySql(String tableNameHistorySql) {
		this.tableNameHistorySql = tableNameHistorySql;
	}

	public String getSqlPage() {
		return sqlPage;
	}

	public void setSqlPage(String sqlPage) {
		this.sqlPage = sqlPage;
	}

	public String getSqlSum() {
		return sqlSum;
	}

	public void setSqlSum(String sqlSum) {
		this.sqlSum = sqlSum;
	}


	public String getSqlPageHistory() {
		return sqlPageHistory;
	}

	public void setSqlPageHistory(String sqlPageHistory) {
		this.sqlPageHistory = sqlPageHistory;
	}

	public String getSqlCountHistory() {
		return sqlCountHistory;
	}

	public void setSqlCountHistory(String sqlCountHistory) {
		this.sqlCountHistory = sqlCountHistory;
	}

	public String getSqlReport() {
		return sqlReport;
	}

	public void setSqlReport(String sqlReport) {
		this.sqlReport = sqlReport;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public Timestamp getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	public Timestamp getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Timestamp modifyDate) {
		this.modifyDate = modifyDate;
	}

	public String getCreateMan() {
		return createMan;
	}

	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}

	public String getModifyMan() {
		return modifyMan;
	}

	public void setModifyMan(String modifyMan) {
		this.modifyMan = modifyMan;
	}

	public String getForeignKey() {
		return foreignKey;
	}

	public void setForeignKey(String foreignKey) {
		this.foreignKey = foreignKey;
	}

	public int getWidth4AddDialog() {
		return width4AddDialog;
	}

	public void setWidth4AddDialog(int width4AddDialog) {
		this.width4AddDialog = width4AddDialog;
	}

	public int getHeight4AddDialog() {
		return height4AddDialog;
	}

	public void setHeight4AddDialog(int height4AddDialog) {
		this.height4AddDialog = height4AddDialog;
	}

	public String getChartJson() {
		return chartJson;
	}

	public void setChartJson(String chartJson) {
		this.chartJson = chartJson;
	}

	public int getChartWidth() {
		return chartWidth;
	}

	public void setChartWidth(int chartWidth) {
		this.chartWidth = chartWidth;
	}

	public int getChartHeight() {
		return chartHeight;
	}

	public void setChartHeight(int chartHeight) {
		this.chartHeight = chartHeight;
	}

	public String getInterceptObject() {
		return interceptObject;
	}

	public void setInterceptObject(String interceptObject) {
		this.interceptObject = interceptObject;
	}

	public String getInterceptAddMethod() {
		return interceptAddMethod;
	}

	public void setInterceptAddMethod(String interceptAddMethod) {
		this.interceptAddMethod = interceptAddMethod;
	}

	public String getInterceptEditMethod() {
		return interceptEditMethod;
	}

	public void setInterceptEditMethod(String interceptEditMethod) {
		this.interceptEditMethod = interceptEditMethod;
	}

	public int getHasCheckbox() {
		return hasCheckbox;
	}

	public void setHasCheckbox(int hasCheckbox) {
		this.hasCheckbox = hasCheckbox;
	}

	public String getDataSource() {
		return dataSource;
	}

	public void setDataSource(String dataSource) {
		this.dataSource = dataSource;
	}

	public String getStyle4AddDialog() {
		return style4AddDialog;
	}

	public void setStyle4AddDialog(String style4AddDialog) {
		this.style4AddDialog = style4AddDialog;
	}

	public int getIsdialog4AddDialog() {
		return isdialog4AddDialog;
	}

	public void setIsdialog4AddDialog(int isdialog4AddDialog) {
		this.isdialog4AddDialog = isdialog4AddDialog;
	}
}
